<div id="meniu_vertical_root">
    <div id="meniu_vertical_child">
    <?php
        $i = 0;
        $x = 1;
        
        echo '<span id="link1" class="upmenu" ><a class="HMNL" href="../../index.html">home</a></span>';
        $ctgs = mysql_query("select * from dt_categories where c_visible = '1'");
        while ($ctg = mysql_fetch_array($ctgs)){
            $var = $x+1;
            if ($_GET['pg'] == 'categories')
                echo '<span id="link'.$var.'" class="upmenu_on"><a class="HMNL" href="../../categories/'.$ctg['c_id'].'/'.cleanitup($ctg['c_title']).'.html">'.$ctg['c_title'].'</a></span>'; 
            else
                echo '<span id="link'.$var.'" class="upmenu" ><a class="HMNL" href="../../categories/'.$ctg['c_id'].'/'.cleanitup($ctg['c_title']).'.html">'.$ctg['c_title'].'</a></span>'; 
            
            $x++;
        }
    ?>
    </div>
</div>